﻿@{
    Layout = "~/Administration/Views/Shared/_AdminLayout.cshtml";
}
@model Nop.Plugin.Widgets.ExternalScripts.Models.ConfigurationModel.ConfigurationDetailModel
@using Nop.Web.Framework;

@using (Html.BeginForm())
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Administration/Content/images/ico-configuration.png")" alt="" />
            @T("Admin.Configuration.Plugins.Misc.Configure") - ExternalScripts <a href="/Admin/Widget/ConfigureWidget?systemName=Widgets.ExternalScripts">(Back to script list)</a>
        </div>
    </div>

    <table class="adminContent">

        <tr>
            <td class="adminTitle" colspan="2">
                You should read <a href="https://nopexternalscripts.codeplex.com/documentation">documentation</a> before using this module
                <br />
                Each script can be configured to archive tree goals:
                <ul>
                    <li>Use default script to include a script on every pages</li>
                    <li>Use checkout/completed script to replace default script on checkout/completed page</li>
                    <li>Use product script to replace default script on product page</li>
                    <li>Use category script to replace default script on category page</li>
                </ul>
            </td>
        </tr>

        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ScriptSystemName):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ScriptSystemName)
                @Html.ValidationMessageFor(model => model.ScriptSystemName)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.IsEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.IsEnabled)
                @Html.ValidationMessageFor(model => model.IsEnabled)
            </td>
        </tr>
        <tr id="pnlDefaultScript">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DefaultScript):
            </td>
            <td class="adminData">
                @Html.TextAreaFor(model => model.DefaultScript, new { style = "Width: 600px; Height: 200px;" })
                @Html.ValidationMessageFor(model => model.DefaultScript)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ContollersAndFreeTokens):
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.ContollersAndFreeTokens, new { style = "Width: 600px;" })
                @Html.ValidationMessageFor(model => model.ContollersAndFreeTokens)
            </td>
        </tr>


        <tr>
            <td class="adminTitle" colspan="2">
                Special scripts for checkout/completed page
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CheckoutCompletedScript):
            </td>
            <td class="adminData">
                @Html.TextAreaFor(model => model.CheckoutCompletedScript, new { style = "Width: 600px; Height: 200px;" })
                @Html.ValidationMessageFor(model => model.CheckoutCompletedScript)
            </td>
        </tr>

        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CheckoutCompletedDetailScript):
            </td>
            <td class="adminData">
                @Html.TextAreaFor(model => model.CheckoutCompletedDetailScript, new { style = "Width: 600px; Height: 100px;" })
                @Html.ValidationMessageFor(model => model.CheckoutCompletedDetailScript)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.PaymentMethodsLabels):
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.PaymentMethodsLabels, new { style = "Width: 600px;" })
                @Html.ValidationMessageFor(model => model.PaymentMethodsLabels)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ShippingMethodsLabels):
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.ShippingMethodsLabels, new { style = "Width: 600px;" })
                @Html.ValidationMessageFor(model => model.ShippingMethodsLabels)
            </td>
        </tr>
        <tr>
            <td class="adminTitle" colspan="2">
                Special scripts for products and categories
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ProductScript):
            </td>
            <td class="adminData">
                @Html.TextAreaFor(model => model.ProductScript, new { style = "Width: 600px; Height: 200px;" })
                @Html.ValidationMessageFor(model => model.ProductScript)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ProductIdsAndFreeTokens):
            </td>
            <td class="adminData">
                @Html.TextAreaFor(model => model.ProductIdsAndFreeTokens, new { style = "Width: 600px;" })
                @Html.ValidationMessageFor(model => model.ProductIdsAndFreeTokens)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CategoryScript):
            </td>
            <td class="adminData">
                @Html.TextAreaFor(model => model.CategoryScript, new { style = "Width: 600px; Height: 200px;" })
                @Html.ValidationMessageFor(model => model.CategoryScript)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CategoryIdsAndFreeTokens):
            </td>
            <td class="adminData">
                @Html.TextAreaFor(model => model.CategoryIdsAndFreeTokens, new { style = "Width: 600px;" })
                @Html.ValidationMessageFor(model => model.CategoryIdsAndFreeTokens)
            </td>
        </tr>
    </table>

    <table class="adminContent">
        <tr>
            <td colspan="2" width="100%">
                <input type="submit" name="save" class="t-button" value="@T("Admin.Common.Save")" />
            </td>
        </tr>
    </table>
}
